// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie;

import java.util.HashMap;

public class CollisionMatrixPrototypes {
    public static zombie.CollisionMatrixPrototypes instance = new zombie.CollisionMatrixPrototypes();
    public HashMap<Integer, boolean[][][]> Map = new HashMap();

    public int ToBitMatrix(boolean[][][] _boolean) {
        int int0 = 0;

        for (int int1 = 0; int1 < 3; int1++) {
            for (int int2 = 0; int2 < 3; int2++) {
                for (int int3 = 0; int3 < 3; int3++) {
                    if (_boolean[int1][int2][int3]) {
                        int0 = zombie.BitMatrix.Set(int0, int1 - 1, int2 - 1, int3 - 1, true);
                    }
                }
            }
        }

        return int0;
    }

    public boolean[][][] Add(int int0) {
        if (this.Map.containsKey(int0)) {
            return (boolean[][][])this.Map.get(int0);
        } else {
            boolean[][][] _boolean = new boolean[3][3][3];

            for (int int1 = 0; int1 < 3; int1++) {
                for (int int2 = 0; int2 < 3; int2++) {
                    for (int int3 = 0; int3 < 3; int3++) {
                        _boolean[int1][int2][int3] = zombie.BitMatrix.Is(int0, int1 - 1, int2 - 1, int3 - 1);
                    }
                }
            }

            this.Map.put(int0, _boolean);
            return _boolean;
        }
    }
}
